<?php


namespace app\admin\controller;


use app\admin\model\PositionModel;
use app\BaseController;
use app\common\Constants\ErrorCode;
use think\Model;
use think\response\Json;

class Position extends BaseController
{

    /**
     * @return Json
     * @author ran
     * @date 2021-09-23 13:54
     * mailbox 466180170@qq.com
     */
    public function readAdminPositionList():Json
    {
        $request = $this->request->param();
        $model = new PositionModel();
        if (empty($request['page']) || empty($request['limit'])) return $this->failed(ErrorCode::SYSTEM_INVALID);
        $res          = $model->getShopAdminPositionListResource((int)$request['page'],(int)$request['limit']);
        return $this->success($res,'获取资源成功',$res['dataCount']);
    }

}